package com.guonl.feign;

import com.guonl.config.FeignDecoderConfiguration;
import com.guonl.feign.annotation.Backoff;
import com.guonl.feign.annotation.FeignRetry;
import com.guonl.model.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = "guonl-springcloud-order", configuration = FeignDecoderConfiguration.class)
public interface OrderFeign {

    @FeignRetry(feignName = "guonl-springcloud-order", include = RuntimeException.class, backoff = @Backoff(delay = 500L))
    @RequestMapping(value = "/order/getOrder")
    ResponseResult getOrder(@RequestParam(value = "orderId") String orderId);

}
